-
Notifications
You must be signed in to change notification settings - Fork 31
Improve Timeout.timeout documentation formatting and typos #92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This commit makes a few minor improvements to the documentation of the `Timeout.timeout` method. The changes include fixing typos and enhancing formatting for better readability. We can see the latest version of the documentation here: https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout Also, we can verify this change locally by running: ```shell rdoc open doc/Timeout.html ```
| # is that Timeout::Error inherits from RuntimeError and might be caught unexpectedly by +rescue+. | ||
| # Timeout::ExitException inherits from Exception so it will only be rescued by <tt>rescue Exception</tt>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand those cases will be fixed by @st0012's work to better support Markdown in RDoc, is that correct?
If so I'm not so inclined to have HTML tags here, it looks pretty messy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fix the rendering though, and the other changes look good so I guess let's go with that for now, and then maybe go back to backticks once RDoc supports them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah if we update RDoc to 7.10 then we can use backticks in rdoc markup too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know when that would happen for ruby/ruby? (since it doesn't seem to work for https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's interesting because the rescue one line above is now correctly rendered. And this line is rendered as ‘rescue Exception`. I wonder if the beginning quote is actually not a backtick character 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In RDoc format, Only `single_word` is allowed mainly because of the restriction using regexp and gsub in parsing (I think).
Remaining backticks and quotes are converted to multibyte quotes ‘’”“
This PR makes a few minor improvements to the documentation of the
Timeout.timeoutmethod. The changes include fixing typos and enhancing formatting for better readability.We can see the latest version of the documentation here:
https://docs.ruby-lang.org/en/master/Timeout.html#method-c-timeout
Also, we can verify this change locally by running: